//
// Created by 11793 on 2025/11/1.
//
#include <stdio.h>
//数组排序

//冒泡升序排序
void bubble_sort(int *arr,int size){
    for (int i = 0; i < size-1; ++i) {
        for (int j = 0; j < size - i-1; ++j) {
           if(arr[j]>arr[j+1]){
               int t;
               t = arr[j];
               arr[j] = arr[j+1];
               arr[j+1] = t;
           }
        }
    }
    for (int i = 0; i < size; ++i) {
        printf("%d ",arr[i]);
    }
}


int main(){
    int num[5] = {100,23,54,12,13};
    bubble_sort(num,5);
}